#ifndef _USER_PID_H_

#define _USER_PID_H_
typedef struct 
{
  int16_t SetCurrent;
  int16_t ActualCurrent;
  int16_t err;
  int16_t err_last;
  int16_t Kp,Ki;
  int16_t Increment;
  int16_t integral;
  int16_t umax;
  int16_t umin;
} pid_t;

void PID_init(pid_t *pid);
int16_t PID_realize(int16_t Current, int16_t ActualCurrent);

#endif